#!/usr/bin/env python
import os
import sys

if __name__ == "__main__":
    os.environ.setdefault("DJANGO_SETTINGS_MODULE", "myfinance.settings")  # 设置Django配置模块
    try:
        from django.core.management import execute_from_command_line  # 导入命令行执行器
    except ImportError as exc:
        raise ImportError("Couldn't import Django.") from exc  # Django未安装时的错误提示
    execute_from_command_line(sys.argv)  # 执行命令行参数
